<html>
<head>
  <title>使用 JavaScript</title>
  <script>
    function changeColor() {
      var x = document.getElementById("myDiv");
      x.style.color = "red";
      x.innerHTML = "Hello, World!";
    }
  </script>
</head>
<body>
  <h1>JavaScript 示例</h1>
  <div id="myDiv">
    This is a Div element.
  </div>
  <button onclick="changeColor()">点击修改颜色和内容</button>
</body>
</html>
